home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / doom / ldhe-src.0 / ldhe-src / dehacked / source / utils / makeregdata.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-05  |  412 b   |  23 lines

  1.  
  2. #include <stdio.h>
  3.  
  4. #define VGA_TOTAL_REGS    60
  5. #define LINESIZE    12
  6. #define NUMLINES    (VGA_TOTAL_REGS/LINESIZE)
  7.  
  8. main()
  9. {
  10.     unsigned char regbuf[LINESIZE];
  11.     int i, j;
  12.  
  13.     printf("static char reg_data[%d] = {\n", VGA_TOTAL_REGS);
  14.     for ( i=0; i<NUMLINES; ++i ) {
  15.         fread(regbuf, LINESIZE, 1, stdin);
  16.         printf("\t");
  17.         for ( j=0; j<LINESIZE; ++j )
  18.             printf("0x%.2x, ", regbuf[j]);
  19.         printf("\n");
  20.     }
  21.     printf("};\n");
  22. }
  23.